package com.hightrast.service.compareToData.stage.impl;

import com.hightrast.service.api.entity.RastOrderProductItems;
import com.hightrast.service.compareToData.stage.EntityComparator;

import java.util.Objects;

/**
 * 订单商品项 比较策略实现
 */
public class RastOrderProductItemComparator implements EntityComparator<RastOrderProductItems> {
    @Override
    public boolean areEqual(RastOrderProductItems newEntity, RastOrderProductItems oldEntity) {
        return Objects.equals(newEntity.getOrderStatus(), oldEntity.getOrderStatus()) &&
                Objects.equals(newEntity.getPaybackStatus(), oldEntity.getPaybackStatus())
                ;
    }
}